package loja.teste.venda;

import static org.junit.Assert.assertTrue;

import java.math.BigDecimal;

import loja.model.pessoa.cliente.Cliente;
import loja.model.venda.Venda;
import loja.services.factory.ServiceFactory;
import loja.services.factory.helper.ServiceFactoryHelper;
import loja.teste.TestBase;

import org.junit.Test;

public class ListarVendasAReceberDeClienteTest extends TestBase {

	@Test
	public void test001() {
		ServiceFactory serviceFactory = ServiceFactoryHelper
				.getServiceFactory();

		Cliente cliente = serviceFactory.getClienteService()
				.consultarClientePorId(5L);

		for (Venda venda : serviceFactory.getVendaService()
				.listarVendasAReceberDeCliente(cliente)) {

			System.out.println(venda.getIdVenda() + " - "
					+ venda.getData().getTime());

		}

		assertTrue(true);

	}

	@Test
	public void test002() {

		ServiceFactory serviceFactory = ServiceFactoryHelper
				.getServiceFactory();

		serviceFactory.getClienteService().incluirPagamentoCliente(5L,
				BigDecimal.ZERO);

		assertTrue(true);

	}

}
